/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cse333.panels;

import cse333.PanelSwitcher;
import cse333.SwitchablePanel;
import java.awt.GridBagConstraints;
import java.awt.Insets;

/**
 *
 * @author yurifariasg
 */
public class StudentScholarshipsPanel extends SwitchablePanel {

    private PanelSwitcher pc;
    
    /**
     * Creates new form StudentMainPanel2
     */
    public StudentScholarshipsPanel(PanelSwitcher pc) {
        initComponents();
        this.pc = pc;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        titleLabel = new javax.swing.JLabel();

        setBackground(new java.awt.Color(0, 0, 0));
        setMinimumSize(new java.awt.Dimension(216, 125));
        java.awt.GridBagLayout layout = new java.awt.GridBagLayout();
        layout.columnWidths = new int[] {0, 5, 0};
        layout.rowHeights = new int[] {0, 5, 0};
        setLayout(layout);

        jPanel1.setBackground(new java.awt.Color(0, 0, 0));
        jPanel1.setLayout(new java.awt.GridBagLayout());
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipady = 200;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        add(jPanel1, gridBagConstraints);

        titleLabel.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
        titleLabel.setForeground(new java.awt.Color(255, 255, 255));
        titleLabel.setText("My Scholarships");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0);
        add(titleLabel, gridBagConstraints);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel titleLabel;
    // End of variables declaration//GEN-END:variables

    @Override
    public void sendData(Object object) {
    }

    @Override
    public void onSwitch() {
        removeAll();
        initComponents();
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.weighty = 1;
        gbc.anchor = GridBagConstraints.NORTH;
        gbc.insets = new Insets(0, 0, 10, 0);
        jPanel1.add(new ScholarshipStatusBox(pc), gbc);
        gbc.gridy++;
        jPanel1.add(new ScholarshipStatusBox(pc), gbc);
        gbc.gridy++;
        jPanel1.add(new ScholarshipStatusBox(pc), gbc);
        gbc.gridy++;
        jPanel1.invalidate();
        jPanel1.repaint();
        invalidate();
        repaint();
    }
}
